#include <funcc.h> 
using namespace std;

void inputInt(int & value){
    cout<<"请输入一个整型数据"<<endl;

    string word;

    while(cin >> word, !cin.eof()){
        auto it = word.begin();
        for (; it != word.end(); it++){
            if(!isdigit(*it)){
                cout << "请输入整型数据" << endl;
                break;
            }
        }

        if (it == word.end()){
            value = stoi(word);
            cout << "输入的数据为" << value << endl;
            break;
        }  
    }
}

int main(void){
    int value;
    inputInt(value);

    return 0;
}